//
//  EntranceUITests.swift
//  EntranceUITests
//
//  Created by Chunhui on 2018/2/1.
//  Copyright © 2018年 chunhuiLai. All rights reserved.
//

import XCTest

class EntranceUITests: XCTestCase {
        
    override func setUp() {
        super.setUp()
        
        super.setUp()
        
        let app = XCUIApplication()
        setupSnapshot(app)
        app.launch()
        // Put setup code here. This method is called before the invocation of each test method in the class.
        
        // In UI tests it is usually best to stop immediately when a failure occurs.
        continueAfterFailure = false
        // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
        XCUIApplication().launch()

        // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
    }
    
    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }
    
    func testExample() {
        // Use recording to get started writing UI tests.
        
        let app = XCUIApplication()
        let tablesQuery = app.tables
        tablesQuery/*@START_MENU_TOKEN@*/.staticTexts["segue to phoneRechare"]/*[[".cells.staticTexts[\"segue to phoneRechare\"]",".staticTexts[\"segue to phoneRechare\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.tap()
        
        snapshot("phonerecharge_view")
        
        app.textFields["请输入手机号码"].tap()
        snapshot("phonerecharge_editing_view")
        
        app.navigationBars["Entrance.PhoneRechargeView"].buttons["back arrow"].tap()
        tablesQuery/*@START_MENU_TOKEN@*/.staticTexts["To keychain"]/*[[".cells.staticTexts[\"To keychain\"]",".staticTexts[\"To keychain\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.tap()
        snapshot("keychain_view")
    }
    
}
